from rest_framework.viewsets import ModelViewSet
from django.contrib.auth.models import Group,Permission

from apps.meiduo_admin.serializers.group import Groupserializer, PermissionSerializer
from apps.meiduo_admin.utils import PageNum
from rest_framework.generics import ListAPIView


class GroupModelViewSet(ModelViewSet):
    queryset = Group.objects.all()
    serializer_class = Groupserializer
    pagination_class = PageNum


class GetGroup(ListAPIView):
    queryset = Permission.objects.all()
    serializer_class =PermissionSerializer